<?php

	require_once('../../includes/bootstrap.php');
	
	if(isset($_POST['serialize']))
	{
		$serialize	= $_POST['serialize'];
		$array		= array_filter(explode(',', $serialize));
		$value		= serialize($array);
		
		echo(
			'<pre>' . PHP_EOL . 
			'Post Value		' . $serialize . PHP_EOL . 
			'Conversion		' . print_r($array, true) . PHP_EOL . 
			'Serialized Value	' . $value . PHP_EOL . 
			'</pre>' . PHP_EOL 
		);
	}
	
	echo(
		'<form method="post" action="">
			<h3>Array to serialize (seperate by commas, no spaces between them</h3>
			<textarea rows="20" cols="80" name="serialize"></textarea><br />
			<input type="submit" value="Serialize" />
		</form>' . PHP_EOL 
	);

?>